//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.Jpanel;

import com.tool.btn.FormsOnOffBtn;
import com.tool.tcpimg.UIUtils;
import org.come.mouslisten.SystemMouslisten;
import org.come.until.MessagrFlagUntil;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.ImageObserver;
import javax.swing.*;

public class ChatSwitchJpanel extends JPanel {
    private String[] name = new String[]{"当前", "队伍", "帮派", "世界", "战斗", "系统", "信息"};
    private JLabel[] checkBoxLabels;
    private JLabel[] selectLabels;
    private JLabel[] titleLabels;
    private ImageIcon icon;

    public ChatSwitchJpanel() {
        FormsOnOffBtn offBtn;
        int i;
            this.setPreferredSize(new Dimension(351, 307));
            this.setLayout((LayoutManager)null);
            this.setBackground(new Color(0, 0, 0, 0));
            offBtn = new FormsOnOffBtn("inkImg/button/1.png", 1, 709);
            offBtn.setBounds(314, 15, 25, 25);
            this.add(offBtn);
            this.checkBoxLabels = new JLabel[this.name.length];
            this.selectLabels = new JLabel[this.name.length];
            this.titleLabels = new JLabel[this.name.length];

            for(i = 0; i < this.name.length; ++i) {
                this.checkBoxLabels[i] = new JLabel();
                this.checkBoxLabels[i].setBounds(93 + i % 2 * 115, 65 + i / 2 * 25, 17, 17);
                this.checkBoxLabels[i].setIcon(new ImageIcon("inkImg/button/14.png"));
                this.selectLabels[i] = new JLabel();
                this.selectLabels[i].setBounds(this.checkBoxLabels[i].getX(), this.checkBoxLabels[i].getY(), 15, 15);
                if (FrameMessageChangeJpanel.getChatSwitch(i)) {
                    this.selectLabels[i].setIcon(new ImageIcon("inkImg/button/13.png"));
                }

                final int finalI = i;
                this.selectLabels[i].addMouseListener(new MouseListener() { // from class: org.come.Jpanel.ChatSwitchJpanel.1
                    public void mouseClicked(MouseEvent e) {
                    }

                    public void mousePressed(MouseEvent e) {
//                        if (FrameMessageChangeJpanel.setChatSwitch(finalI)) {
//                            ChatSwitchJpanel.this.selectLabels[finalI].setIcon(new ImageIcon("inkImg/button/13.png"));
//                            if (finalI==4){
//                                FrameMessageChangeJpanel.xianshi=true;
//                            }
//                        } else {
//                            ChatSwitchJpanel.this.selectLabels[finalI].setIcon((Icon) null);
//                            if (finalI==4){
//                                FrameMessageChangeJpanel.xianshi=false;
//                            }
//                        }
                        SystemMouslisten.writeTxt();
                    }

                    public void mouseReleased(MouseEvent e) {
                    }

                    public void mouseEntered(MouseEvent e) {
                        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
                    }

                    public void mouseExited(MouseEvent e) {
                        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
                    }
                });

                this.add(this.selectLabels[i]);
                this.add(this.checkBoxLabels[i]);
                this.titleLabels[i] = new JLabel(this.name[i]);
                this.titleLabels[i].setForeground(UIUtils.COLOR_NAME_BACKGROUND);
                this.titleLabels[i].setFont(UIUtils.TEXT_FONT61);
                this.titleLabels[i].setBounds(this.checkBoxLabels[i].getX() + 20, this.checkBoxLabels[i].getY() - 2, 40, 20);
                this.add(this.titleLabels[i]);
            }
    }

    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
//        if("水墨UI".equals(MyIsif.getStyle())) {
            this.icon = new ImageIcon("inkImg/background/pdkg.png");
            g.drawImage(this.icon.getImage(), 0, 0, (ImageObserver)null);
//        } else {
//            this.icon = new ImageIcon("inkImg/hongmu/pdkg1.png");
//            g.drawImage(this.icon.getImage(), 0, 0, (ImageObserver)null);
//        }

    }
}
